# -*- mode: python -*-
# vi: set ft=python :

load("@ros2//:ros_cc.bzl", "ros_cc_binary")
load("@ros2//:ros_py.bzl", "ros_py_binary")
load("@ros2//:ros_py.bzl", "ros_py_test")

ros_cc_binary(
    name = "iiwa_manipulator",
    srcs = ["iiwa_manipulator.cpp"],
    visibility = ["//visibility:public"],
    deps = [
        "@drake//examples/manipulation_station",
        "@drake//systems/analysis:simulator",
        "@drake//systems/framework:diagram_builder",
        "@drake//systems/primitives:adder",
        "@drake//systems/primitives:constant_vector_source",
        "@drake//systems/primitives:sine",
        "@drake_ros_repo//core",
        "@drake_ros_repo//viz",
        "@gflags",
    ],
)

ros_py_binary(
    name = "iiwa_manipulator_py",
    srcs = ["iiwa_manipulator.py"],
    main = "iiwa_manipulator.py",
    visibility = ["//visibility:public"],
    deps = [
        "@drake//bindings/pydrake",
        "@drake_ros_repo//:drake_ros_py",
        "@ros2//:rclpy_py",
    ],
)

ros_py_test(
    name = "iiwa_manipulator_test",
    srcs = ["test/iiwa_manipulator_test.py"],
    data = [
        ":iiwa_manipulator",
        ":iiwa_manipulator_py",
    ],
    main = "test/iiwa_manipulator_test.py",
    deps = [
        "@ros2//resources/bazel_ros_env:bazel_ros_env_py",
    ],
)
